<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>欢迎页</title>
<#assign base=request.contextPath  />
    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css">
    <link rel="stylesheet" href="${base}/frame/static/css/style.css">
    <link rel="icon" href="${base}/frame/static/image/code.png">
    <script type="text/javascript" src="${base}/frame/layui/layui.js"></script>
    <script type="text/javascript" src="${base}/jquery-1.8.3.min.js"></script>
    <style type="text/css">
        html { overflow-x: hidden; overflow-y: auto; }
        .fujia{
            height: 100px;
            height: 100px;
        }
        .layui-col-space10 {
            margin: 10px;
        }
        .content-tips {
            width: 100%;
            height: 39px;
            background-color: #FDE9C7;
            padding-left: 1.667%;
        }
        .layui-badge{
            font-size: 18px;
            line-height: 30px;
            height: 30px;
        }
        .layui-col-space10 > * {
            padding: 0px;
        }
    </style>
</head>
<body>
<div style="margin: 10px;">
    <#--<h2 style="font-size: 30px; font-family: '微软雅黑';">企业名称:${Session["user"].getPtname()}</h2>-->
    <h6 style="font-size: 18px; font-family: '微软雅黑';color: #777777;margin-top: 20px;">登录时间:<span id="logInfo"></span></h6>
</div>
<hr class="layui-bg-blue">


<!--滚动条-->
<a style="float: left;margin: 8px;  " href="javascript:closeMSG()"> <i id="msgIcon" class="layui-icon layui-icon-triangle-r" style="font-size: 20px; color: #0C0C0C "></i></a>
<div class="layui-layout-admin" id="msg">
    <div class="content-tips">
        <span style="line-height: 39px;"><i class="layui-icon layui-icon-speaker" style="font-size: 30px; color: #1E9FFF;"></i> </span>
        <marquee width="90%">
            <div id="header_demo">
                <table border="0" cellspacing="0" cellpadding="0">
                    <tr >
                        <td id="header_demo1"   >

                        </td>

                    </tr>
                </table>

            </div>
        </marquee>

    </div>
</div>



<a href="${base}/ptMoneyInfo/main.html"><div class="layui-row layui-col-space10 my-index-main">
    <div class="layui-col-xs4 layui-col-sm3 layui-col-md3">
        <div class="my-nav-btn layui-clear" data-href="./demo/账户余额.html">
            <div class="layui-col-md5">
                <button class="layui-btn layui-btn-big layui-btn-danger layui-icon fujia">&#xe65e;</button>
            </div>
            <div class="layui-col-md7 tc">
                <p class="my-nav-text"><span class="layui-badge" style="font-size: 30px">${Session["user"].getMoeny()}</span></p>
               <p class="my-nav-text layui-elip">企业余额</p>
            </div>
        </div>
    </div></a>
<a href="${base}/comPeople/main.html"><div class="layui-col-xs4 layui-col-sm3 layui-col-md3">
        <div class="my-nav-btn layui-clear" data-href="./demo/用户管理.html">
            <div class="layui-col-md5">
                <button class="layui-btn layui-btn-big layui-btn-warm layui-icon fujia">&#xe770;</button>
            </div>
            <div class="layui-col-md7 tc">
                <p class="my-nav-text"><span class="layui-badge layui-bg-orange" style="font-size: 30px">${num}</span></p>
                <p class="my-nav-text layui-elip">用户数量</p>
            </div>
        </div>
    </div></a>
<a href="${base}/comChargeInfo/main.html"> <div class="layui-col-xs4 layui-col-sm3 layui-col-md3">
        <div class="my-nav-btn layui-clear" data-href="充电记录.html">
            <div class="layui-col-md5">
                <button class="layui-btn layui-btn-big layui-bg-black layui-icon fujia">&#xe6b2;</button>
            </div>
            <div class="layui-col-md7 tc">
                <p class="my-nav-text"><span class="layui-badge layui-bg-green" style="font-size: 30px">${num2}</span></p>
                <p class="my-nav-text layui-elip">充电记录</p>
            </div>
        </div>
    </div></a>
<a href="${base}/car/carGo.html" style="padding: 0px">
    <div class="layui-col-xs4 layui-col-sm3 layui-col-md3">
    <div class="my-nav-btn layui-clear" data-href="./demo/密码管理.html">
        <div class="layui-col-md5">
            <button class="layui-btn layui-btn-big layui-btn-normal layui-icon fujia">&#xe705;</button>
        </div>
        <div class="layui-col-md7 tc">
            <p class="my-nav-text"><span class="layui-badge layui-bg-blue" style="font-size: 30px">${num3}</span></p>
            <p class="my-nav-text layui-elip">车辆明细</p>
        </div>
    </div>
</div></a>
    <!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
    <div id="main-line" style="width: 45%;height:300px;float: left;"></div>

    <div id="main-bing" style="width: 45%;height:300px;float: right;"></div>
    <script language="javascript">

            $.ajax({
                type : "POST", //提交方式
                url : "${base}/comUserCarRenting/findWelcomScroll",//路径
                success : function(data) {//返回数据根据结果进行相应的处理
                   for (var i=0;i<data.length;i++){
                       $("#header_demo1").append(
                    '<a  style="color: #2E2D3C" href="#"><span>'+data[i].isName+ data[i].startTime+' 租的'+data[i].carBrand+'车牌号为：'+data[i].carNumber+'还有'+data[i].expirationTime+'小时过期&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></a>'
                       )
                   }
                }
            });







        function getCurDate() {
            var d = new Date();
            var week;
            switch(d.getDay()) {
                case 1:week = "星期一";break;
                case 2:week = "星期二";break;
                case 3:week = "星期三";break;
                case 4:week = "星期四";break;
                case 5:week = "星期五";break;
                case 6:week = "星期六";break;
                default:week = "星期天";
            }
            var years = d.getFullYear();
            var month = add_zero(d.getMonth() + 1);
            var days = add_zero(d.getDate());
            var hours = add_zero(d.getHours());
            var minutes = add_zero(d.getMinutes());
            var seconds = add_zero(d.getSeconds());
            var ndate = years + "年" + month + "月" + days + "日 " + hours + ":" + minutes + " "  + week;
            var divT = document.getElementById("logInfo");
            divT.innerHTML = ndate;
        }

        function add_zero(temp) {
            if(temp < 10) return "0" + temp;
            else return temp;
        }
        setInterval("getCurDate()", 100);
    </script>
    <script type="text/javascript" src="${base}/frame/layui/layui.all.js"></script>
    <script type="text/javascript" src="${base}/frame/echarts/echarts.min.js"></script>
    <script src="${base}/scrollBar/scrollBar.js" type="text/javascript"></script>
    <script src="${base}/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script type="text/javascript">

        // // 基于准备好的dom，初始化echarts实例
        // var myChart = echarts.init(document.getElementById('main-line'));
        //
        // // 使用刚指定的配置项和数据显示图表。
        // myChart.setOption({
        //     title: {
        //         text: '加盟情况'
        //     },
        //     tooltip: {},
        //     legend: {
        //         data:['销量']
        //     },
        //     xAxis: {
        //         data: ["加盟量","充电量","生产量","租车量"]
        //     },
        //     yAxis: {},
        //     series: [{
        //         name: '认证量',
        //         type: 'bar',
        //         data: [487, 266, 300,688]
        //     }]
        // });
        //
        // // 基于准备好的dom，初始化echarts实例
        // var chart = echarts.init(document.getElementById('main-bing'));
        //
        // // 配置
        // chart.setOption({
        //     series : [
        //         {
        //             name: '来源',
        //             type: 'pie',
        //             radius: '55%',
        //             data:[
        //                 {value:500, name:'一线城市'},
        //                 {value:435, name:'二线城市'},
        //                 {value:310, name:'三线城市'},
        //                 {value:234, name:'四线城市'},
        //                 {value:135, name:'五线城市'}
        //             ]
        //         }
        //     ]
        // });
        //
        // layui.use(['element'], function(){
        //     var element = layui.element
        //         ,$      = layui.jquery;
        //
        //     // you code ...
        //
        //
        // });

    </script>


    <script>


        //隐藏通知
        function closeMSG(){
            $("#msg").toggle()
            if($("#msg").is(":hidden") ){
                $("#msgIcon").attr("class","layui-icon layui-icon-triangle-d")
            }else{
                $("#msgIcon").attr("class","layui-icon layui-icon-triangle-r")
            }

        }
    </script>
</body>
</html>